package test02.b;

/**
 * @Author lzp
 * @Date 2024-03-20
 */
public class SumThread extends Thread{
    private int m;
    private int n;
    public int sum;
    public SumThread(){

    }
    public SumThread(int m,int n){
        this.m=m;
        this.n=n;
    }

    @Override
    public void run() {
        for (int i=m; i <=n; i++) {
            sum+=i;
        }
    }

    public int getSum() {
        return sum;
    }
}
